<%@ tag language="java" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/utils/includes.jsp"%>
<%@ attribute name="value" type="java.lang.Object" required="true" rtexprvalue="true"%>
<%@ attribute name="checked" type="java.lang.Boolean" required="false" rtexprvalue="true"%>
<%@ attribute name="path" required="true" type="java.lang.String" rtexprvalue="false"%>
<%@ attribute name="editable" required="false" type="java.lang.Boolean" rtexprvalue="true"%>
<%@ attribute name="hidden" required="false" type="java.lang.Boolean" rtexprvalue="true"%>

<c:choose>
	<c:when test="${hidden}">
		<input type="hidden" id="${path}" name="${path}" value="${value}">
	</c:when>
	<c:when test="${editable}">
		<input type="checkbox" id="${path}" name="${path}" value="${value}" ${checked ? "checked" : ""}>
	</c:when>
	<c:otherwise>
		<input type="hidden" id="${path}" name="${path}" value="${value}">
		<input type="checkbox" ${checked ? "checked" : ""} disabled="disabled">
	</c:otherwise>
</c:choose>
